package mymyoux.io.sockets.servers.mserverClasses
{
	import mymyoux.utils.Hash;

	public class Rooms
	{
		protected var _rooms:Hash;
		public function Rooms()
		{
			_rooms = new Hash();
		}
		public function contains(name:String):Boolean
		{
			return _rooms.exists(name);
		}
		public function add(room:Room):void
		{
			_rooms.put(room.name, room);
		}
		public function get(room:String):Room
		{
			return _rooms.get(room) as Room;
		}
		public function rem(room:Room):void
		{
			_rooms.remove(room.name);
		}
		public function get length():uint
		{
			return _rooms.length;
		}
	}
}